/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package frmwrk.core;

import frmwrk.interfaces.IAccount;
import frmwrk.interfaces.IEntry;
import frmwrk.interfaces.IParty;
import java.util.Observable;
import java.util.Observer;

/**
 *
 * @author akefeli
 */
public abstract class AbstractNotification implements Observer {
    
    @Override
    public void update(Observable o, Object arg){
        Account acc =(Account) o;
        Entry entry = (Entry) arg;
        isEntryNotified(acc, entry);        
    }
    
    public String getPartyType(Account acc){
        
        return acc.getParty().getPartyType();
    }
    
    public String getAccountType(Account acc){
        
        return acc.getAccountType();
    }
    
    public String getEntryType(Entry entry){
        
        return entry.getEntryType();
    }
    public abstract boolean isEntryNotified(Account acc, Entry entry);
}
